#ifndef CLASS_MANAGER_INPUT_HPP_
# define CLASS_MANAGER_INPUT_HPP_

# include "Abstract/Manager/AManager.hpp"

# include "Class/Manager/Graphics.hpp"

# include "Define/Input/Key.hpp"
# include "Define/Input/Mouse.hpp"
# include "Define/Math/Dimension.hpp"

namespace		Manager
{
  class			Input: public AManager
  {
  public:
	Input(Manager::Graphics &);

	bool				IsKeyDown(::Input::Key::Code) const throw();
	::Input::State		KeyState(::Input::Key::Code) const throw();
	float				KeyDownTime(::Input::Key::Code) const throw();
	bool				IsMouseButtonDown(::Input::Mouse::Button) const throw();
	::Input::State		MouseButtonState(::Input::Mouse::Button) const throw();
	float				MouseButtonDownTime(::Input::Mouse::Button) const throw();

	void				Update(float);

	~Input() throw();


  private:
	void				_UpdateStates(float);


  private:
	Manager::Graphics	&_Graphics;

	float				_keyTime[::Input::Key::Count];
	::Input::State		_keyState[::Input::Key::Count];
	float				_mouseTime[::Input::Mouse::ButtonCount];
	::Input::State		_mouseState[::Input::Mouse::ButtonCount];
	int					_mousePos[::Math::Dimension2];
	int					_mouseDelta;
  };
}

#endif
